package com.daotingli.backendprograms.Service.Author.booktype;

import com.daotingli.backendprograms.Repository.Author.booktype.BookTypeRepository;
import com.daotingli.backendprograms.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookTypeService {
    @Autowired
    private BookTypeRepository bookTypeRepository;


    public Result getAll(String username, String password) {
        return Result.success(bookTypeRepository.getAll(username, password));
    }

    public Result getAllBooks(int id) {
        return  Result.success(bookTypeRepository.getAllBooks(id));
    }

    public Result getAuthorBookIDs(int id) {
        return Result.success(bookTypeRepository.getAuthorBookIDs(id));
    }

    public Result getBookTag(int id) {
        return Result.success(bookTypeRepository.getBookTag(id));
    }

    public Result getAuthorInfo(int id) {
        return Result.success(bookTypeRepository.getAuthorInfo(id));
    }
}
